!lm10
!rm76
The Lower Case Apple..........................Bob Matzinger

It occured to me that, since I have installed a Dan Paymar Lower Case Adapter, there ought to be a better way to generate lower case characters than by RAM-resident software.

The major problem is the F8 ROM.  The CAPTST routine at $FD7E will not allow lower case characters to pass; if they get this far, they will be converted to upper case here.  I cannot figure a reason for this routine, since the Apple will not generate lower case codes in the first place!

Anyway, there are only two ways I know of to avoid CAPTST:  write my own line input subroutine (I want to avoid that!), or burn a new F8 ROM.  All I would have to change is one lousy byte, at $FD83, from $DF to $FF.  Seems like a waste of time...or is it?  Maybe, since I am going to the trouble of burning the ROM, I can add some routines to extend the capabilities of my keyboard to access ALL of the ASCII characters.

That is what I decided to do.  But!  How do I make it transparent?  It should not interfere with or be interfered by any program or language.

Within the monitor routines there are two that are not used; in fact, they were removed when the Autostart ROM came about.  These are the 16-bit multiply and divide routines from $FB60 through $FBC0.  I can insert my new code there.

I also need two RAM locations for shift lock and case flags.  I must find two locations that would probably NOT be used by any other program.  There are a number of location in zero page that are not normally used; the bottom of the stack and the top of the input buffer might not be used.  Checking that out, however, I have found that most other people have thought of these locations already.  Where can I go?

I found two bytes not used by anyone, inside the screen buffer area.  They are reserved for the board plugged into slot 6, which in my case is the disk controller.  The disk controller does not use locations $077E and $07FE ($0778+slot# and $07F8+slot#).  More than likely, nobody would use these locations (at least that is what I am gambling on).

Now that I have room for flags, the next step is to write the routines to fit between $FB60 and $FBC0, and set up calls to them.  I have to be careful not to change any other routines.  Here is what I want:

!lm15
1.  Upon RESET, initialize to upper case.
2.  Have a shift and shift-lock routine.
3.  Be able to enter all ASCII characters.
!lm10

When RESET is pressed, or when the Apple is turned on, the 6502 microprocessor executes a JMP indirect using the address at $FFFC and $FFFD.  This effectively jumps to $FF59 in the monitor which is the reset routine.  The reset routine calls INIT at $FB2F, which in turn ends with a JMP VTAB at $FB5D.  If I change that last instruction, it can fall into the area formerly occupied by the multiply routine.  How convenient!  I'll put the code there to set upper case mode.

Most programs written for use with the Paymar Adapter have their own input routines.  The monitor routines are not used.  Therefore my changes should have no adverse effect on these programs.

The next thing I had to decide was which control-keys to use for shift, shift-lock, and the three characters not available from the standard Apple keyboard.  I didn't want to use the escape key, since it is used by so many other programs.  I finally chose these:

!lm15
control-Z:  Shift and Shift-lock
control-K:  Left bracket and Left Brace
control-L:  Backslash and Vertical Bar
control-O:  Underline and Rubout
!lm10

One final problem to overcome is passing the cursor over a lower case character.  The cursor, in the normal monitor, makes the character under the cursor flash.  A lower case character will flash in upper case, so you cannot tell whether it was lower or upper case without moving the cursor.  I decided to make lower case characters under the cursor display as inverse upper case, rather than flashing.  That way there is no doubt.

Now how do we get the patches into the ROM?  First we need to get a copy of the standard ROM code into RAM.  Then assemble the patches, and save the patched copy on disk.  From inside the S-C Assembler II, type:

     :$6800<F800.FFFFM             (copy monitor into RAM)
     :ASM                          (assemble the patches)
     :BSAVE F8 EPROM,A$6800,L$800  (save patched monitor)

After the patches had been made, I used ROMWRITER, by Mountain Hardware, to burn a 2716 EPROM.  This EPROM was then inserted, with appropriate adaptation, in the F8 socket on my Apple mother board.

[NOTE:  A 2716 EPROM WILL NOT DIRECTLY REPLACE THE F8 ROM.  EITHER THE MOTHER BOARD CIRCUITRY MUST BE MODIFIED OR AN APPROPRIATE SOCKET ADAPTER MUST BE USED.]

If you have a 16K RAM card, you can try the patched monitor without burning a ROM.  After the patches have been assembled into the standard copy at $6800, type the following:

     :$C081 C081                 (write enable RAM card)
     :$F800<6800.6FFFM           (copy new monitor up)
     :$C080                      (turn on RAM version)

After putting the patched monitor into the RAM card, you have to patch the assembler to turn off its own CAPTST, if you want to see the lower case stuff work inside the assembler.  Type:

     :$139B:FF

This will make the assembler allow lower case characters to be typed in, but they are only legal in comments.

Some more words of caution.  These patches are for the "old" monitor ROM.  They will not work in the Autostart ROM.  My choice of control-K and control-L may upset some users.  Control-K is used as a monitor command equivalent for IN#slot, and control-L is used to generate a form-feed on some printers.  I can always go to BASIC for the IN#slot, and my printer has a button for form-feed.  I feel that the full upper-lower case ability is much more desirable.

WHEN ALL ELSE FAILS, READ THE INSTRUCTIONS AGAIN!
